package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AlarmData1Mapper;
import com.ruoyi.system.domain.AlarmData1;
import com.ruoyi.system.service.IAlarmData1Service;

/**
 * 报警Service业务层处理
 * 
 * @author zly
 * @date 2023-07-14
 */
@Service
public class AlarmData1ServiceImpl implements IAlarmData1Service 
{
    @Autowired
    private AlarmData1Mapper alarmData1Mapper;

    /**
     * 查询报警
     * 
     * @param id 报警主键
     * @return 报警
     */
    @Override
    public AlarmData1 selectAlarmData1ById(Long id)
    {
        return alarmData1Mapper.selectAlarmData1ById(id);
    }

    /**
     * 查询报警列表
     * 
     * @param alarmData1 报警
     * @return 报警
     */
    @Override
    public List<AlarmData1> selectAlarmData1List(AlarmData1 alarmData1)
    {
        return alarmData1Mapper.selectAlarmData1List(alarmData1);
    }

    /**
     * 新增报警
     * 
     * @param alarmData1 报警
     * @return 结果
     */
    @Override
    public int insertAlarmData1(AlarmData1 alarmData1)
    {
        alarmData1.setCreateTime(DateUtils.getNowDate());
        return alarmData1Mapper.insertAlarmData1(alarmData1);
    }

    /**
     * 修改报警
     * 
     * @param alarmData1 报警
     * @return 结果
     */
    @Override
    public int updateAlarmData1(AlarmData1 alarmData1)
    {
        return alarmData1Mapper.updateAlarmData1(alarmData1);
    }

    /**
     * 批量删除报警
     * 
     * @param ids 需要删除的报警主键
     * @return 结果
     */
    @Override
    public int deleteAlarmData1ByIds(Long[] ids)
    {
        return alarmData1Mapper.deleteAlarmData1ByIds(ids);
    }

    /**
     * 删除报警信息
     * 
     * @param id 报警主键
     * @return 结果
     */
    @Override
    public int deleteAlarmData1ById(Long id)
    {
        return alarmData1Mapper.deleteAlarmData1ById(id);
    }
}
